import { Component } from 'vue-facing-decorator'
import Render from '@/render/Render'
import toNative from '@/utils/toNative'
import TreeRelationCard, { type TreeCardDto } from '@/components/tree-relation-card/Index'

@Component
export class CustomerServiceAdmin extends Render {

    treeData = [
        {
            title: '经营总览1',
            titleRight: <div>1111</div>,
            content: <div>content</div>,
            children: [
                {
                    title: '经营总览1-1',
                    titleRight: <div>1111</div>,
                    content: <div>content</div>,
                    children: [
                        {
                            title: '经营总览1-1-1',
                            titleRight: <div>1111</div>,
                            content: <div>content</div>
                        },
                        {
                            title: '经营总览1-1-2',
                            titleRight: <div>1111</div>,
                            content: <div>content</div>
                        },
                        {
                            title: '经营总览1-1-3',
                            titleRight: <div>1111</div>,
                            content: <div>content</div>
                        },
                    ]
                },
                {
                    title: '经营总览1-2',
                    titleRight: <div>1111</div>,
                    content: <div class="h-300px">content</div>,
                    children: [
                        {
                            title: '经营总览1-2-1',
                            titleRight: <div>1111</div>,
                            content: <div>content</div>
                        },
                        {
                            title: '经营总览1-2-2',
                            titleRight: <div>1111</div>,
                            content: <div>content</div>
                        },
                        {
                            title: '经营总览1-2-3',
                            titleRight: <div>1111</div>,
                            content: <div>content</div>
                        },
                    ]
                },
                {
                    title: '经营总览1-3',
                    titleRight: <div>1111</div>,
                    content: <div>content</div>,
                },
            ]
        },
        {
            title: '经营总览2',
            titleRight: <div>1111</div>,
            content: <div>content</div>,
            children: [
                {
                    title: '经营总览2-1',
                    titleRight: <div>1111</div>,
                    content: <div>content</div>,
                },
                {
                    title: '经营总览2-2',
                    titleRight: <div>1111</div>,
                    content: <div>content</div>,
                },
                {
                    title: '经营总览2-3',
                    titleRight: <div>1111</div>,
                    content: <div>content</div>,
                },
            ]
        }
    ] as TreeCardDto[]

    render() {
        return <div>
            <TreeRelationCard treeData={this.treeData} />
        </div>
    }
}

export default toNative<{}, {}>(CustomerServiceAdmin)